**1.** Add the following script tag to the `index.html` file right before the `</body>` tag. This will only run on the client side and will polyfill Node globals.

```html
  <script>
    window.global = window;
    window.process = {
      env: { DEBUG: undefined },
    }
    var exports = {};
  </script>
</body>
```

**2.** Update the `vite.config.ts` (or `vite.config.js`) and add a resolve alias inside the `defineConfig({})` as seen below.

```ts
export default defineConfig({
  plugins: [react()],
  resolve: {
      alias: [
      {
        find: './runtimeConfig',
        replacement: './runtimeConfig.browser', // ensures browser compatible version of AWS JS SDK is used
      },
    ]
  }
})
```
